@*
 *Author：jxx
 *Contact：283591387@qq.com
 *Date：2018-07-01
 * 此代码由框架生成，请勿随意更改
 *@
@{
    Layout = "~/Views/Shared/ManagerLayout.cshtml";
}

<!DOCTYPE html>

<html>
<head>
    <title></title>
</head>
<body>
    <div style=" padding: 0px 5px 0px 2px; height: 100%;">

        <div id="lay-search-panel" class="panel lay-panel" style=" margin-bottom: 5px;border:0px;">
        </div>
        <div id="lay-reslut" class=" lay-reslut ">
            <table id="dataGrid"></table>
        </div>
    </div>
</body>
</html>

@{await Html.RenderPartialAsync("~/Views/Shared/Uploader.cshtml");}
@{await Html.RenderPartialAsync("~/Views/Shared/Ueditor.cshtml");}


<script>
    @{ViewBag.dropDownIds = "nav,tc,dr,enable";}
    var searchData = [[{"columnType":"int","dataSource":optionConfignav,"displayType":"dropList","text":"导航分类","require":false,"id":"ClassifyId"},{"columnType":"int","dataSource":optionConfigtc,"displayType":"dropList","text":"二级分类标题","require":false,"id":"SecondClassifyId"},{"columnType":"string","dataSource":[],"displayType":"","text":"标题","require":false,"id":"Title"}],[{"columnType":"string","dataSource":[],"displayType":"","text":"发布人","require":false,"id":"Author"},{"columnType":"byte","dataSource":optionConfigdr,"displayType":"drop","text":"是否今日推荐","require":false,"id":"DailyRecommend"},{"columnType":"byte","dataSource":optionConfigenable,"displayType":"drop","text":"是否启用","require":false,"id":"Enable"}],[{"columnType":"datetime","dataSource":[],"displayType":"datetime","text":"发布日期","require":false,"id":"ReleaseDate"},{"columnType":"datetime","dataSource":[],"displayType":"datetime","text":"修改时间","require":false,"id":"ModifyDate"}]];
    var editData = [[{"columnType":"string","dataSource":[],"displayType":"","text":"标题","require":true,"id":"Title","colSize":12,"fileMaxCount":3}],[{"columnType":"int","dataSource":optionConfignav,"displayType":"drop","text":"导航分类","require":false,"id":"ClassifyId","fileMaxCount":3},{"columnType":"int","dataSource":optionConfigtc,"displayType":"drop","text":"二级分类标题","require":true,"id":"SecondClassifyId","fileMaxCount":3}],[{"columnType":"byte","dataSource":optionConfigdr,"displayType":"drop","text":"是否今日推荐","require":true,"id":"DailyRecommend","fileMaxCount":3},{"columnType":"int","dataSource":[],"displayType":"无","text":"推荐排序","require":false,"id":"OrderNo","fileMaxCount":3}],[{"columnType":"int","dataSource":[],"displayType":"","text":"浏览次数","require":false,"id":"ViewCount","fileMaxCount":3},{"columnType":"byte","dataSource":optionConfigenable,"displayType":"drop","text":"是否启用","require":false,"id":"Enable","fileMaxCount":3}],[{"columnType":"string","dataSource":[],"displayType":"text","text":"浏览地址","require":false,"id":"DetailUrl","colSize":12,"fileMaxCount":3}],[{"columnType":"string","dataSource":[],"displayType":"file","text":"封面图片","require":false,"id":"ImageUrls","colSize":12,"fileMaxCount":3}],[{"columnType":"string","dataSource":[],"displayType":"richText","text":"信息正文","require":true,"id":"Content","colSize":12,"fileMaxCount":3}]];


    var gridParameters = {
        loadMsg: '数据正在加载。。。。',
        //rownumbers: true,
        pageSize: 30,
        pageList: [10, 20, 30, 50, 80, 100, 200, 500, 1000],
        height: 340,
        key:'Id',
        url: '/App_TechnicalClassify/GetPageData',
        nameSpace:'',
        queryParams: {TableName:'App_TechnicalClassify',sort:'Id',Foots:' ',Wheres:'{}'},
        pagination: true,
        striped:true,
        fileLink:true,
        richText:true,
        hasSection:false,
        cnName:'养牛宝信息发布',
        calculateHeight:{id:'#lay-search-panel'},
        calculateWidth:{id:'#lay-search-panel',totalWidth:1850,totalCol:13},
    frozenColumns: [[
     { field: 'ck', checkbox: true }
    ]],
    //showFooter: true,
        columns: [[{field:'Id',title:'主键ID',datatype:'int',width:80,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ClassifyId',title:'导航分类',datatype:'int',width:150,editor: { type: 'combobox', options: optionConfignav },formatter: function (val, row, index) {
    return dataSourcenav.textFormatter(optionConfignav, val, row, index);
    },
align:'left',sortable:true},
                       {field:'SecondClassifyId',title:'二级分类标题',datatype:'int',width:120,editor: { type: 'combobox', options: optionConfigtc },formatter: function (val, row, index) {
    return dataSourcetc.textFormatter(optionConfigtc, val, row, index);
    },
require:true,align:'left'},
                       {field:'SecondClassifyTitle',title:'二级分类标题',datatype:'string',width:90,hidden:true,require:true,align:'left'},
                       {field:'Title',title:'标题',datatype:'string',width:300,editor:'text',formatter:function (val, row, index) { return $.fn.layOut('createViewField',{row:row,val:val,index:index})},require:true,align:'left'},
                       {field:'Content',title:'信息正文',datatype:'string',width:300,hidden:true,editor:'text',require:true,align:'left'},
                       {field:'ViewCount',title:'浏览次数',datatype:'int',width:80,editor:'text',align:'left'},
                       {field:'DetailUrl',title:'浏览地址',datatype:'string',width:90,editor:'text',align:'left'},
                       {field:'ImageUrls',title:'封面图片',datatype:'string',width:220,editor:'text',formatter:function (val, row, index) { return $.fn.layOut('createImageUrl',{row:row,key:'ImageUrls'})},align:'left'},
                       {field:'BigImageUrls',title:'图片(大图)',datatype:'string',width:220,hidden:true,align:'left'},
                       {field:'UrlType',title:'Url类型',datatype:'int',width:80,hidden:true,align:'left'},
                       {field:'Author',title:'发布人',datatype:'string',width:120,hidden:true,readonly:true,align:'left'},
                       {field:'ReleaseDate',title:'发布日期',datatype:'DateTime',width:150,hidden:true,readonly:true,align:'left',sortable:true},
                       {field:'DailyRecommend',title:'是否今日推荐',datatype:'byte',width:120,editor: { type: 'combobox', options: optionConfigdr },formatter: function (val, row, index) {
    return dataSourcedr.textFormatter(optionConfigdr, val, row, index);
    },
require:true,align:'left'},
                       {field:'OrderNo',title:'推荐排序',datatype:'int',width:120,editor:'text',align:'left'},
                       {field:'Enable',title:'是否启用',datatype:'byte',width:90,editor: { type: 'combobox', options: optionConfigenable },formatter: function (val, row, index) {
    return dataSourceenable.textFormatter(optionConfigenable, val, row, index);
    },
align:'left'},
                       {field:'CreateID',title:'创建人Id',datatype:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'发布人',datatype:'string',width:130,align:'left'},
                       {field:'CreateDate',title:'发布时间',datatype:'DateTime',width:150,align:'left',sortable:true},
                       {field:'ModifyID',title:'修改人ID',datatype:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人',datatype:'string',width:130,align:'left'},
                       {field:'ModifyDate',title:'修改时间',datatype:'DateTime',width:150,align:'left',sortable:true}]]
    };

    var $elementGrid;
    window.onload = function () {
        $elementGrid = $('#dataGrid').datagrid(gridParameters);
    }

    var $elementDetailGrid;
    var gridDetailParameters = '';
</script>
